#{extends 'main.html' /}<h2><a style ="color:#420042;" href = "@{Projects.showProject((Long)project.getEntityId())}">${project.name}</a> > <a href="@{Tasks.showAllProjectTasks(project.getEntityId())}" style="color:#400040;">Tasks</a> > View Task</h2>
<hr/> #{secure.check 'Create/edit/delete Task in my project'}
<a href="@{Tasks.showEditTask(task.getEntityId(),project.getEntityId())}">Edit Task</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a href="javascript:showDialogHelper('Confirmation','Are you sure you want to delete?',true,'@{Tasks.deleteTask(task.getEntityId(),project.getEntityId())}','prompt');">Delete Task</a>
#{/secure.check}<hr/>
<br/>
<b>Task:</b>
${task.description}
<br/>
<br/>
<b>Description:</b>
${task.details}
<br/>
<br/>
<b>Status:</b>
${task.status.status}
<br/>
<br/>
<b>Type:</b>
${task.type.type}
<br/>
<br/>
#{if task.priority}<b>Priority:</b>
${task.priority}
<br/>
<br/>
#{/if}<b>Creator:</b>
${task.creator.firstName} ${task.creator.lastName}
<br/>
<br/>
%{ 
entity = controllers.Tasks.renderGetTaskAssignee(task.getEntityId());  
if (entity != null) 
{  
firstName = entity.firstName; 
lastName = entity.lastName;  
}% <b>Assignee:</b>
${firstName} ${lastName} 
<br/>
<br/>
%{
}
}%
#{if task.creationDate}<b> Creation Date:</b>
%{date = task.creationDate.getTime()}% ${date}
<br/>
<br/>
#{/if}
#{if task.resolvingDate}<b>Resolving Date:</b>
%{date = task.resolvingDate.getTime()}% ${date}
<br/>
<br/>
#{/if}
#{if task.closingDate}<b>Closing Date:</b>
%{date = task.closingDate.getTime()}% ${date}
<br/>
<br/>
#{/if}
#{if task.note}<b>Note:</b>
${task.note}
<br/>
<br/>
#{/if}
#{if task.userStory}<b>Associated with the user story:</b>
As a/an 
 #{list items: task.userStory.appRoles, as: 'appRole'}
${appRole.name},
#{/list}
${task.userStory.story}
<br/>
<br/>
#{/if}
#{if dependOn}<b>Depends on the Task(s):</b>
<br/>
#{list items:dependOn, as:'dependOnTask'}<a href="@{Tasks.showTask(dependOnTask.getEntityId())}">${dependOnTask.description}</a>
<br/>
#{/list}
<br/>
<br/>
#{/if}
#{if dependants}<b>Dependant Task(s):</b>
<br/>
#{list items:dependants, as:'dependant'}<a href="@{Tasks.showTask(dependant.getEntityId())}">${dependant.description}</a>
<br/>
#{/list}
<br/>
<br/>
#{/if}
#{if events}<b>Associated with Event(s):</b>
<br/>
#{list items:events, as:'event'}&nbsp;-&nbsp;<a href="@{Events.showEvent(event.getEntityId())}">${event.name}</a>
<br/>
#{/list}
<br/>
#{/if}
#{if sprint}<b>Associated to Sprint: </b>
<a href="@{Events.showSprint(sprint.getEntityId())}">${sprint.name}</a>
<br/>
<br/>
#{/if}
#{if reviewer}<b></>Reviewer: </b>${reviewer.firstName} ${reviewer.lastName}
<br/>
<br/>
#{/if}
#{else}
#{if creator}<a href="@{Tasks.showAssignReviewer(project.getEntityId(),task.getEntityId())}">Assign Reviewer</a>
<br/>
<br/>
#{/if}
#{/else}
<br/>
<br/>
#{if isReviewer}
#{if isResolved}<a href="@{Tasks.showReviewTask(task.getEntityId())}">Submit Review</a>
#{/if}
#{/if}
#{if task.initialEffortEstimation}<b> Effort Estimation:</b>
${task.initialEffortEstimation}
<br/>
<br/>
#{/if}
#{else}
%{ if (controllers.Tasks.sameDevloper((Long)task.getEntityId())) { }%
#{form @Tasks.fillTotalEffort(task.getEntityId()), class:'jqtransform', id:'myForm'}<b>Effort:<b/>
    <br/>
    <input id="efield" class="validate[required,custom[onlyNumber],length[1,5]]" name="effort" type="text"/><input id ="ebutton" type="submit" name="submit" class="button" id="submit_btn" value="Enter Estimation" />#{/form}
    %{}}%
    #{/else}
